import React, { useState, useRef } from 'react';

const Login = () => {
  const [username, setUsername] = useState('');
  const userRef = useRef();
  const passwordRef = useRef();
  return (
    <div className="login">
      <div className="container">
        <form action="submit" className="userForm">
          <input type="text" placeholder="请输入用户名" ref={userRef} onChange={e => { setUsername(e.target.value) }} value={ username }/>
          <input type="password" placeholder="请输入密码" ref={passwordRef} />
          {/*eslint-disable-next-line no-undef*/}
          <div>{ process.env.NODE_ENV }</div>
          <button>确定</button>
        </form>
      </div>
    </div>
  )
}
export default Login;
